import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class SwiperIndicator {
  static indicator({current, length, bool textShow}) {
    return Row(
      mainAxisAlignment:
          textShow ? MainAxisAlignment.spaceBetween : MainAxisAlignment.end,
      children: [
        if (textShow)
          Container(
            alignment: Alignment.center,
            width: 60,
            height: 18,
            decoration: BoxDecoration(
                color: Color.fromRGBO(191, 55, 54, 1),
                borderRadius: BorderRadius.circular(9)),
            child: Text(
              '2天行程',
              style: TextStyle(fontSize: 11, color: Colors.white),
            ),
          ),
        Container(
          width: 40,
          height: 18,
          alignment: Alignment.center,
          decoration: BoxDecoration(
            borderRadius: BorderRadius.circular(9),
            color: Color.fromRGBO(0, 0, 0, 0.4),
          ),
          child: Row(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Container(
                child: Text(
                  '$current',
                  style: TextStyle(fontSize: 13, color: Colors.white),
                ),
              ),
              Container(
                child: Text(
                  '/',
                  style: TextStyle(
                      color: Color.fromRGBO(153, 153, 153, 1), fontSize: 13),
                ),
              ),
              Container(
                child: Text(
                  '$length',
                  style: TextStyle(
                      color: Color.fromRGBO(153, 153, 153, 1), fontSize: 13),
                ),
              )
            ],
          ),
        )
      ],
    );
  }
}
